package routers

import (
	"gin_test/api"
	"github.com/gin-gonic/gin"
)

func InitRouter(r *gin.Engine) {
	register(r)
}

// 注册路由

func register(r *gin.Engine) {
	// 接口路由配置
	r.GET("/", api.Default)
	r.GET("/api/success", api.Success)
	r.GET("/api/fail", api.Fail)
	r.POST("/api/user/add", api.CreateUser)
}
